﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/App.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="loginTitle" ContentPlaceHolderID="TitleContent" runat="server">
    登 录
</asp:Content>
<asp:Content ID="loginHeader" runat="server" ContentPlaceHolderID="HeadContent">
    <script src="<%=ResolveUrl("~/Scripts/jQuery.easyValidate.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#username").vRequire({
                errorText: "请填写用户名",
                event: false
            }).focus();

            $("#password").vRequire({
                errorText: "请填写密码",
                event: false
            });
            $("#submitButton").button().click(function () {
                return $.easyValidate('check');
            });
            $("form").submit(function () {
                return $.easyValidate('check');
            });
        });
    </script>
</asp:Content>
<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
    <%= Html.ValidationSummary("登录失败,请更根据以下信息修正后再登录") %>
    <% using (Html.BeginForm())
       { %>
    <div>
        <fieldset class="cssform">
            <legend>账号信息</legend>
            <p>
                <label for="username">
                    用户名:</label>
                <%= Html.TextBox("username")%>
                <%= Html.ValidationMessage("username") %>
            </p>
            <p>
                <label for="password">
                    密 码:</label>
                <%= Html.Password("password") %>
                <%= Html.ValidationMessage("password") %>
            </p>
            <p>
                <label for="rememberMe">
                    记住密码?</label>
                <%= Html.CheckBox("rememberMe") %>
            </p>
            <p>
                <button type="submit" id="submitButton">
                    登录</button>
            </p>
        </fieldset>
    </div>
    <% } %>
</asp:Content>
